'use strict';
angular.module('invoice.recSKHXQuery', [])
	.controller('recSKHXQueryCtrl',['$rootScope', '$scope', 'BizData' , f])
    function f($rootScope, $scope, BizData) {

		var Model = this;
		
		var options = {};
		options.container = Model;
		options.concept = 'AccountPaymentDetail';
		options.name = 'dataMaster';
		options.url = $rootScope.path;
		options.httpUrl = $rootScope.getServiceName();
		options.creater = '';
		options.reader = '/invoice/accountPaymentDetail/query';
		options.writer = '';
		options.deleter = '';
		options.idColumnDefine = "fID";
		options.idColumnName = "fID";
		options.isTree = false;
		options.parentRelation = 'fParent';
		options.nodeKindRelation = 'nodeKind';
		options.nodeLevelRelation = 'nodeLevel';
		options.pathRelation = '';
		options.master = {"data":"","relation":""};
		options.directDeleteMode = true;
		options.limit = 15;
		options.orderBy = "accountPaymentNo";

		Model.dataMaster = new BizData(options);

		//////////////////////////////////////////////
		
		
		
		////////////////////启动执行开始///////////////////////////////////////////////////

		//设置过滤条件
		Model.dataMaster.filter = "AccountPaymentDetail.audit='confirm'"	
//			+ " AND AccountPaymentDetail.status='open'"
			+ " AND (AccountPaymentDetail.clearType='6' OR AccountPaymentDetail.clearType='D')"
			+ " AND (AccountPaymentDetail.revOpay='I' OR AccountPaymentDetail.revOpay='9')"
			+ " AND AccountPaymentDetail.billType<>'5'"
			;

		//刷新数据
	    Model.dataMaster.refreshData();

		////////////////////启动执行结束///////////////////////////////////////////////////
	    
		Model.refresh = function(){
			Model.dataMaster.refreshData();
		}
		
		
	    return Model;
		
	}	
	
